using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ChatClient.metier;

namespace ChatClient.form
{
    public partial class Option : Form
    {
        private Client client;

        public Option(Client client)
        {
            InitializeComponent();
            this.client = client;
            int tmp = Convert.ToInt32(client.Opacity * 100);
            this.Lb_opacite.Text = tmp.ToString() + "%";
            this.trackBar_opacite.Value = Convert.ToInt32(client.Opacity*100);
        }

        private void trackBar_opacite_ValueChanged(object sender, EventArgs e)
        {
            Lb_opacite.Text = trackBar_opacite.Value.ToString() + "%";
            client.Opacity = Convert.ToDouble(trackBar_opacite.Value) / 100;
        }

    }
}